// 订单模块
const {
	Reservation
} = require('../../../model/Reservation');

module.exports = async (req, res) => {
	const revs = {};
	if (req.rev_id) {
		revs = await Reservation.find({
			rev_id
		}).sort('-createTime');
	} else if (req.dateType && req.startDate && req.endDate) {
		revs = await Reservation.find({

		}).sort('-createTime');
	} else {
		revs = await Reservation.find().sort('-createTime');
	}
	// 响应
	res.send(revs);
}